<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>姓名案例</title>
    <script src="../../js/vue.js"></script>
</head> 
<body>
    <div id="root">
        <div class="input_div">
            <h1>欢迎来到 {{name}} 学习</h1>
            <span>姓：</span>
            <input type="text" id="xing" v-model='firstName' placeholder="请输入姓"><br><br>
            <span>名：</span>
            <input type="text" id="ming" v-model='lastName' placeholder="请输入名"><br><br>
            <span>姓名:{{firstName+lastName}}</span>
        </div>
    </div>
    <script type="text/javascript">
        Vue.config.productionTip = false;
        new Vue({
            el: '#root',
            data: {
                'name': '尚硅谷',
                firstName: '张',
                lastName: '三'
            }
        })
    </script>
</body>
</html>